#ifndef DAEMON_INDEX_H
#define DAEMON_INDEX_H

#include "daemon.h"

typedef struct daemon_index_entry {
  char *key;
  daemon_t *daemon;
  struct daemon_index_entry *next;
} daemon_index_entry_t;

typedef struct daemon_index {
  daemon_index_entry_t **list;
} daemon_index_t;

void di_free(daemon_index_t *d);
daemon_index_t *di_create();
int di_insert(daemon_index_t *d, const char *key, daemon_t *daemon);
daemon_t *di_get(daemon_index_t *d, const char *key);

#endif